<?php
include_once('../includes/definer.php');
include_once(INC.'admin/php/bootstrap.php');
include_once(INC.'admin/php/clases/Texto.php');

$categorias = Doctrine_Core::getTable('categoria')->findAll();

$results = array();
foreach ($categorias as $categoria) {
    if ($categoria->id == 1) continue;
    $n = array();
    $n['id'] = $categoria->id;
    $n['es'] = utf8_encode($categoria->getValue('es'));
    $n['en'] = utf8_encode($categoria->getValue('en'));
    $n['pt'] = utf8_encode($categoria->getValue('pt'));
    $results[] = $n;
}
$results = json_encode($results);
header("Content-type: application/json");
echo($results);
?>